package com.xingchi.tornado.generator.config;

import com.baomidou.mybatisplus.generator.function.ConverterFileName;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.SuperBuilder;

import java.util.HashSet;
import java.util.Set;

/**
 * dto相关配置
 *
 * @author xingchi
 * @date 2024/4/2 21:25
 */
@Data
@SuperBuilder
@EqualsAndHashCode(callSuper = true)
public class VOConfig extends BaseConfig {

    /**
     * 转换输出文件名称
     *
     * @since 3.5.0
     */
    @Builder.Default
    private ConverterFileName converterFileName = (entityName -> entityName + "DTO");

    /**
     * dto中需要导入的包
     */
    private final Set<String> voPackage = new HashSet<>();


    @Override
    public String getFileName(String entityName) {
        return converterFileName.convert(entityName);
    }
}
